const MockServer = require('./mockserver')
const fs = require('fs')

let configFile = './conf.json';
let configProdFile = './conf.prod.json';
if(fs.existsSync(configProdFile)){
    configFile = configProdFile;
}
let mockserver = new MockServer(configFile);
module.exports = {
    *beforeSendRequest(requestDetail) {
        return mockserver.beforeSendRequest(requestDetail);
    },
    *beforeSendResponse(requestDetail, responseDetail) {
        return mockserver.beforeSendResponse(requestDetail, responseDetail);
    }
};